<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="jxl.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.io.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>信息查询</title>
<link rel="stylesheet" type="text/css" href="/purpose-for-stu/css/base.css">
</head>
<body>
<% 
	String [][]array;
	array = new String[200][5];
	int row=0,column=0;
	try
	{
		File fileName = new File("D:/workplace/stuinfo.xls");
		Workbook book = Workbook.getWorkbook(fileName);	
		Sheet sheet=book.getSheet(0);		/*获得第一个工作表对象*/	
		for(row = 1; row<200;row++)
		{	
			for(column=0;column<5;column++)
			{	
				Cell cell1=sheet.getCell(column,row);		/*得到第column列第row行的单元格*/
				array[row][column] = cell1.getContents();		/*将cell1的内容赋值给数组array*/				
			}
		}
		book.close();
	}catch(Exception e)
	{
		System.out.println(e);
	}
%>

<div id="container">
	<div id="top">
		<!--Logo start -->
			<div id="logo"></div>
				<div id="info"> 
					<a href="../index.jsp">退出登录</a>
				</div>
		<!--logo end -->
	</div>
	
	<div id="content">
  		<div id="left">
			<%@ include file="../css/menu.jsp"%>
	  	</div>
	  	<div id="maincontent">	
		  <table id="stuinfo"  border="1">
			<tr><th width="150" height="20">学 号</th><th width="150" height="20">姓名</th>
			<th width="180" height="20">出生日期</th><th width="180" height="20">联系电话</th>
			<th width="150" height="20">QQ</th>
			
			
			<% 		
			for(row=1;row<200;row++){
				if(array[1][1]==null) {%>
				<tr><td height="30" width="180" align="center">无任何信息</td></tr>
				<%break;}
				%>					
				<%if(array[row][0]==null) break;%>
			<tr><td width="150" height="20" align="center"><%= array[row][0]%></td><td width="150" height="20"  align="center"><%= array[row][1]%></td>
				<td width="150" height="20" align="center"><%= array[row][2]%></td><td width="150" height="20"  align="center"><%= array[row][3]%></td>
				<td width="150" height="20" align="center"><%= array[row][4]%>
			<%
			}
			%>
			</table>
		</div>
	</div>
	<div id="footer">@copyright</div>
</div>

</body>
</html>